package com.ymatou.iapi.productmanager.testcase.old202012;
import com.google.gson.JsonObject;
import com.ymatou.iapi.productmanager.parameter.product.*;
import com.ymatou.iapi.productmanager.service.AddSellerProductCall;
import com.ymatou.iapi.productmanager.service.ModifySellerProductCall;
import com.ymatou.iapi.productmanager.service.SaveCatalogPackageListCall;
import com.ymatou.iapi.productquery.parameter.GetProductListByProductIdListBean;
import com.ymatou.iapi.productquery.service.GetProductListByProductIdListCall;
import com.ymatou.iapi.selleractivity.service.ApplyActivityCall;
import com.ymatou.iapi.sellerproduct.parameter.ProdTplBean;
import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.TestCase;
import com.ymt.utils.tag.P1;
import com.ymttest.business.service.*;
import com.ymttest.database.annotation.SqlMapperFactory;
import com.ymttest.database.annotation.product.IntergratedProductMapper;
import com.ymttest.database.model.YmtProductsI;
import com.ymttest.database.sqlwapper.YmtProductsIWapper;
import com.ymttest.database.sqlwapper.Ymt_ExpressCountryToModeWapper;
import com.ymttest.database.sqlwapper.Ymt_ExpressSellerToModeWapper;
import com.ymttest.utils.EnvSetup;
import com.ymttest.utils.MapUtil;
import com.ymttest.utils.TestDataManager;
import com.ymttest.utils.YMTDateUtil;

import org.apache.http.client.ClientProtocolException;
import org.json.JSONObject;
import org.junit.*;
import org.junit.experimental.categories.Category;

import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Ignore
public class Ts_ModifySellerProduct {
	private static String sellerName = EnvSetup.getData("productsellername");
	
	private static int sellerId = Integer.parseInt(EnvSetup.getData("productsellerid"));
	
	private static ModifySellerProductCall modifySellerProductCall = new ModifySellerProductCall();
	private static Ymt_ExpressCountryToModeWapper countryToModeWapper=new Ymt_ExpressCountryToModeWapper();
	private static Ymt_ExpressSellerToModeWapper sellerToMode=new Ymt_ExpressSellerToModeWapper();
	private static IntergratedProductMapper intergratedProductMapper = SqlMapperFactory.getIntergratedProductMapper();
	
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("修改商品");
		SqlMapperFactory.getIntergratedProductMapper().updateProductoffSale(sellerId);
	}
	
	@Before
	public void caseUp() {
	}
	
	@AfterClass
	public static void tearDown() {
		Logger.generateResult(modifySellerProductCall.getOpurl());
	}
	
	@After
	public void caseDown() {
		Logger.end(); 
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0001() throws Exception {
		Logger.start(true,"商品-修改product下属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试00111");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			//on sale type
			productSaveModel.setOnSaleType(0);
			//Tariff  Type
			productSaveModel.setTariffType(0);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			//modifyBean.setProduct(productSaveModel);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0002() throws Exception {
		Logger.start(true,"商品-修改product下属性 定期上架");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			modifyAndCheck(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0003() throws Exception {
		Logger.start(true,"商品-修改product下属性 修改视频");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			
			//新增视频
			ProductVideoSaveModel productVideo = new ProductVideoSaveModel();
			productVideo.setVideoUrl("http://v2.ymatou.com/uploads/20180103/6a44924f0b4968e88321061a3704b4cf.mp4");
			productVideo.setPic("http://pic1.ymatou.com/G01/shangou/modif/3B/22/rBBlD1pMiOCAWitxAADUmGEFNI0402_1_1_n_w_o.jpg");
			productVideo.setLength(11573);
			productVideo.setWidth(400);
			productVideo.setHeight(30);
			productVideo.setSize(3070568);
			productSaveModel.setVideoModel(productVideo);
			
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			modifyAndCheck(modifyBean);

			
			//修改视频
			ProductVideoSaveModel productVideo2 = new ProductVideoSaveModel();
			productVideo2.setVideoUrl("http://v2.ymatou.com/uploads/20180122/6a44924f0b4968e88321231061a3704b4cf.mp4");
			productVideo2.setPic("http://pic1.ymatou.com/G01/shangou/add/3B/22/rBBlD1pMi123OCAWitxAADUmGEFNI0402_1_1_n_w_o.jpg");
			productVideo2.setLength(11173);
			productVideo2.setWidth(440);
			productVideo2.setHeight(410);
			productVideo2.setSize(307218);
			productSaveModel.setVideoModel(productVideo2);
			modifyAndCheck(modifyBean);
		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0004() throws Exception {
		Logger.start(true,"商品-修改product descModel下属性 修改文描和图片");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			ProductDescSaveModel descModel = modifyBean.getProduct().getDescModel();
			String pic3 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modifydes-Uj1GHqM004.png";
			String pic4 = "http:://pic1.ymatou.com/G01//M00/322/B5/modifydes-Uj1GHqM004.png";
			String pic5 = "http:://pic1.ymatou.com/G01//M00/322/B5/modifydes-Uj1G2134.png";
			descModel.setDescPicList(Arrays.asList(pic3,pic4,pic5));
			descModel.setDescription("修改文描测试");
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0005() throws Exception {
		Logger.start(true,"商品-修改product descModel下属性 修改sizeTemplateId,buyerNoticeId,sellerServiceId");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			ProductDescSaveModel descModel = modifyBean.getProduct().getDescModel();
			//新增templateID
			SellerProductCallService.deleteTemplate(sellerId);
			//	模版类型（1，尺码模版 2，买家须知 3，买手服务）
			ProdTplBean sizeTemplate = SellerProductCallService.saveTemplate(sellerId, 1);
			ProdTplBean buyerNoticeTemplate = SellerProductCallService.saveTemplate(sellerId, 2);
			ProdTplBean sellerServiceTemplate = SellerProductCallService.saveTemplate(sellerId, 3);
			
			descModel.setSizeTemplateId(sizeTemplate.getTemplateId());
			descModel.setBuyerNoticeId(buyerNoticeTemplate.getTemplateId());
			descModel.setSellerServiceId(sellerServiceTemplate.getTemplateId());
			
			modifyAndCheck(modifyBean);
			
			//修改templateID
			//	模版类型（1，尺码模版 2，买家须知 3，买手服务）
			ProdTplBean sizeTemplate2 = SellerProductCallService.saveTemplate(sellerId, 1);
			ProdTplBean buyerNoticeTemplate2 = SellerProductCallService.saveTemplate(sellerId, 2);
			ProdTplBean sellerServiceTemplate2 = SellerProductCallService.saveTemplate(sellerId, 3);
			
			descModel.setSizeTemplateId(sizeTemplate2.getTemplateId());
			descModel.setBuyerNoticeId(buyerNoticeTemplate2.getTemplateId());
			descModel.setSellerServiceId(sellerServiceTemplate2.getTemplateId());
			
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0006() throws Exception {
		Logger.start(true,"商品-修改product descModel下属性 修改报关信息");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ProductDescSaveModel descModel = modifyBean.getProduct().getDescModel();
			//新增declaration
			descModel.setDeclarationId(4412);
			modifyAndCheck(modifyBean);
			
			//修改declaration
			descModel.setDeclarationId(4123);
			modifyAndCheck(modifyBean);
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0007() throws Exception {
		Logger.start(true,"商品-修改product descModel下属性 修改spuId");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			//新增spu
			modifyBean.getProduct().setSpuId(237471);
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0008() throws Exception {
		Logger.start(true,"商品-修改product descModel下属性 修改商品属性值");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<ProductPropertySaveModel> prodPropertyList = modifyBean.getProduct().getPropertyList();
			//修改原有属性
			prodPropertyList.get(0).setPropertyValues(Arrays.asList("中国"));
			modifyAndCheck(modifyBean);
			//新增属性
			ProductPropertySaveModel newPropertyModel = new ProductPropertySaveModel();
			newPropertyModel.setPropertyId(71);
			newPropertyModel.setPropertyValues(Arrays.asList("11","12"));
			
			ProductPropertySaveModel newPropertyModel2 = new ProductPropertySaveModel();
			newPropertyModel2.setPropertyId(26);
			newPropertyModel2.setPropertyValues(Arrays.asList("小样"));
			
			prodPropertyList.add(newPropertyModel);
			prodPropertyList.add(newPropertyModel2);
			
			modifyAndCheck(modifyBean);
			
			//删除部分属性
			prodPropertyList.remove(1);
			modifyAndCheck(modifyBean);
			
		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0009() throws Exception {
		Logger.start(true,"商品-修改product 规格节点下普通属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(3383);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//price
			catalogMode1.setPrice(10);
			catalogMode2.setPrice(10);
			
			//vip price
			catalogMode1.setVipPrice(9);
			catalogMode2.setVipPrice(9.1);
			
			//new price
			catalogMode1.setNewPrice(8);
			catalogMode2.setNewPrice(8);
			
			//stock
			catalogMode1.setStock(3000);
			catalogMode2.setStock(3022);
			
			//sku
			catalogMode1.setSku("modify123");
			catalogMode2.setSku("modify321");
			
			//productcode
			catalogMode1.setProductCode("123modifycode");
			catalogMode2.setProductCode("321modifycode");
			
			//weight
			catalogMode1.setWeight(12.1);
			catalogMode2.setWeight(21.1);
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0010() throws Exception {
		Logger.start(true,"规格-修改product 规格节点下多物流和预售属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//多物流支持
			catalogMode2.setMultiLogistics(1);
			
			//修改预售
			catalogMode1.setPreSale(true);
			
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	

	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0011() throws Exception {
		Logger.start(true,"规格-修改product 规格节点下套装属性");
		try{
			SaveCatalogPackageListCall saveCatalogPackageListCall = new SaveCatalogPackageListCall();
			int packageId1 = saveCatalogPackageListCall.callAndGetReturnData(MapUtil.hashMap("ProductPackageList[0]->SubCatalogName","测试组合001测试组合001"))
									.getJSONObject("Data").getJSONArray("SubCatalogIdList").getInt(0);
			
			int packageId2 = saveCatalogPackageListCall.callAndGetReturnData(MapUtil.hashMap("ProductPackageList[0]->SubCatalogName","测试组合002测试组合001"))
					.getJSONObject("Data").getJSONArray("SubCatalogIdList").getInt(0);
			
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			
			//新增套装
			catalogMode1.setPackage(true);
			catalogMode1.setSubCatalogIdList(Arrays.asList(packageId1));
			
			catalogMode2.setPackage(true);
			catalogMode2.setSubCatalogIdList(Arrays.asList(packageId2));
			modifyAndCheck(modifyBean);
			
			// 删除套装
			catalogMode1.setPackage(false);
			catalogMode1.setSubCatalogIdList(null);
			modifyAndCheck(modifyBean);
			
			//修改
			int packageId3 = saveCatalogPackageListCall.callAndGetReturnData(MapUtil.hashMap("ProductPackageList[0]->SubCatalogName","测试组合003测试组合001"))
					.getJSONObject("Data").getJSONArray("SubCatalogIdList").getInt(0);
			catalogMode2.setSubCatalogIdList(Arrays.asList(packageId2,packageId3));
			modifyAndCheck(modifyBean);
			
			
			//删除一个
			catalogMode2.setSubCatalogIdList(Arrays.asList(packageId3));
			modifyAndCheck(modifyBean);
			
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0012() throws Exception {
		Logger.start(true,"商品-修改product 规格节点下属性图");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			
			//修改属性图
			catalogMode1.getPropertyList().get(0).setPropertyUrl("http://pic1.ymatou.com/G01//modify1/3A/B5/rBBlD1n4FoqAEeSFAAdYEcXNxCc313.png");
			//catalogMode1.getPropertyList().get(1).setPropertyUrl("http://pic1.ymatou.com/G01//modify2/23A/B5/rBBlD1n4FoqAEeSFAAdYEcXNxCc313.png");
			modifyAndCheck(modifyBean);
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
//	@Ignore
	public void Tc_ModifySellerProduct_0013() throws Exception {
		Logger.start(true,"规格-修改product 规格节 新增 删除规格");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//规格1 只变价格
			catalogMode1.setPrice(1231.23);
			
			//规格2 删除
			catalogMode2.setOperateType(3);
			
			//新增规格3 
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(32344.32);
			catalogMode3.getPropertyList().get(0).setPropertyValue("绿色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("M");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0013_001() throws Exception {
		Logger.start(true,"规格-修改product规格节点，新增规格，修改规格，删除规格 app兼容,删除时候不传该规格，删除成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			Logger.debug(catalogList);
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//规格1 只变价格
			catalogMode1.setPrice(15);
			
			//规格2 删除
			catalogList.remove(catalogMode2);
			
			//新增规格3 
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(11);
			catalogMode3.setNewPrice(7);
			catalogMode3.setVipPrice(9);
			catalogMode3.getPropertyList().get(0).setPropertyValue("绿色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("M");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);


			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_013_002() throws Exception {
		Logger.start(true,"规格-修改product 规格节 新增 删除规格 app兼容,删除时候不传该规格  老规格全删除");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//规格1,2 删除
			catalogList.remove(catalogMode1);
			catalogList.remove(catalogMode2);
			
			//新增规格3 
			AddSellerProductRequest addProdReq2 = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(32344.32);
			catalogMode3.setMarketPrice(40000);
			catalogMode3.getPropertyList().get(0).setPropertyValue("绿色");
			//catalogMode3.getPropertyList().get(1).setPropertyValue("L");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Ignore
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_013_003() throws Exception {
		Logger.start(true,"规格-修改product app 单规格修改 不传规格id，删除成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			
			//规格1 只变价格
			String catalogId = modifyBean.getProduct().getCatalogList().get(0).getCatalogId();
			modifyBean.getProduct().getCatalogList().get(0).setPrice(12313.12);
			//modifyBean.getProduct().getCatalogList().get(0).setNewPrice(12313.12);
			modifyBean.getProduct().getCatalogList().get(0).setCatalogId(null);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			modifyBean.getProduct().getCatalogList().get(0).setCatalogId(catalogId);
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ModifySellerProduct_013_004() throws Exception {
		Logger.start(true,"规格-修改product app 多规格修改单规格修改 不传规格id，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			modifyBean.getProduct().getCatalogList().remove(1);
			//规格1 只变价格
			modifyBean.getProduct().getCatalogList().get(0).setNewPrice(12313.12);
			//modifyBean.getProduct().getCatalogList().get(0).setCatalogId(null);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	
	public void Tc_ModifySellerProduct_014() throws Exception {
		Logger.start(true,"规格-修改product 多规格变一个多规格，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			CatalogSaveModel catalogMode1 = catalogList.get(0);
			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
			//规格1,2 删除
			catalogMode1.setOperateType(3);
			catalogMode2.setOperateType(3);
			
			//新增单规格3 
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("单规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(12);
			catalogMode3.setVipPrice(10);
			catalogMode3.setNewPrice(9);
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			
			
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_015() throws Exception {
		Logger.start(true,"规格-修改product 单规格变多规格，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
			
			//规格删除
			catalogList.get(0).setOperateType(3);
			
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode2 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode2.setPrice(12);
			catalogMode2.setNewPrice(10);
			catalogMode2.setVipPrice(9);
			catalogMode2.setOperateType(1);
			catalogList.add(catalogMode2);
			
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(1);
			catalogMode3.setPrice(33344.32);
			catalogMode3.setOperateType(1);
			
			catalogList.add(catalogMode3);
			
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_016() throws Exception {
		Logger.start(true,"规格-修改product 多规格启用，未启用，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			//未启用
			modifyBean.getProduct().getCatalogList().get(0).setAction(-2);
			modifyAndCheck(modifyBean);
			
			
			//启用
			modifyBean.getProduct().getCatalogList().get(0).setAction(0);
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_017() throws Exception {
		Logger.start(true,"规格-修改product 修改多物流方式和差价，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			modifyBean.getProduct().setMultiLogistics(3);
			modifyBean.getProduct().setFlightBalance(20d);
			modifyBean.getProduct().getCatalogList().get(0).setMultiLogistics(3);
			
			modifyAndCheck(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_018() throws Exception {
		Logger.start(true,"活动商品-正在进行活动商品不能修改规格，修改失败");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			
			//String productId = new AddSellerProductCall().callAndGetReturnData(addProdReq).getJSONObject("Data").getString("ProductId");
			AddSellerProductCall addSellerProductCall=new AddSellerProductCall();
			addSellerProductCall.setData(addProdReq);
			addSellerProductCall.callService();
			JSONObject ret1=new JSONObject(addSellerProductCall.getReturnData());
			String productId = ret1.getJSONObject("Data").getString("ProductId");
			
			//参加活动
			AddProductCallService.getProdPriceWithActivity(sellerId,productId,null);
			
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(productId,addProdReq);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回码校验");
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_019() throws Exception {
		Logger.start(true,"活动商品-编辑报名参加活动商品，编辑成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			//String productId = new AddSellerProductCall().callAndGetReturnData(addProdReq).getJSONObject("Data").getString("ProductId");
			AddSellerProductCall addSellerProductCall=new AddSellerProductCall();
			addSellerProductCall.setData(addProdReq);
			addSellerProductCall.callService();
			JSONObject ret=new JSONObject(addSellerProductCall.getReturnData());
			String productId = ret.getJSONObject("Data").getString("ProductId");
			
			// 报名活动
			int activityId = ActivityCallService.createActivityInProcess(null);
			ApplyActivityCall.applyProductInActivity(sellerId, productId, activityId, MapUtil.hashMap());

			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(productId,addProdReq);
			
			//手动查日志
			//没变 不发消息
			modifySellerProductCall.callAndGetReturnData(modifyBean);
			
			//规格变 发消息
			modifyBean.getProduct().getCatalogList().get(0).setPrice(12344);
			modifySellerProductCall.callAndGetReturnData(modifyBean);
			
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_020() throws Exception {
		Logger.start(true,"商品-买手app强制下架商品编辑报错");
		try{
			Logger.comment("发布商品");
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			Logger.comment("下架");
			SellerProductCallService.batchSetProductOnSale(ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString(), sellerId);
			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			Logger.comment("修改商品onsaletype=2");
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setOnSaleType(2);
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			
			//商品名称
			productSaveModel.setProductName("修改测试001");
			
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			
//			//修改catalogstatus
//			productSaveModel.setCatalogStatus(4);
//			productSaveModel.setBondedArea(1);
			
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			
			//autorefresh
			productSaveModel.setAutoRefresh(false);
			
			//productcode
			productSaveModel.setProductCode("312312325y");
			
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			
//			//on sale type
//			productSaveModel.setOnSaleType(0);
			
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
//			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_021() throws Exception {
		Logger.start(true,"物流-修改product-买手没有当前的物流方式发布权限-迭代");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			
			//商品名称
			productSaveModel.setProductName("修改测试001");
			
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			
			//修改catalogstatus
			addProdReq.getProduct().setCatalogStatus(9);//5贝海保税区，4买手保税区
			addProdReq.getProduct().setBondedArea(2);
			
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			
			//productcode
			productSaveModel.setProductCode("312312325y");
			
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			
			//on sale type
			productSaveModel.setOnSaleType(0);
			
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回code");
			Logger.verifyEquals(true, ret.getString("Msg").contains("买手没有当前的物流方式发布权限"), "返回Msg");

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_022() throws Exception {
		Logger.start(true,"物流-修改product-买手没有当前的保税仓发布权限-迭代");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(288484);

			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
	
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			//on sale type
			productSaveModel.setOnSaleType(0);
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			//修改catalogstatus
			addProdReq.getProduct().setCatalogStatus(6);//5贝海保税区，4买手保税区
			addProdReq.getProduct().setBondedArea(2);
			//先删isDelete=true
			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), true);
			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), true);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回code");
			Logger.verifyEquals(true, ret.getString("Msg").contains("买手没有当前的物流方式发布权限"), "返回Msg");
			//后设置isDelete=false
			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), false);
			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), false);

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_023() throws Exception {
		Logger.start(true,"物流-修改product-买手没有当前的物流方式发布权限-国家和买手没有物流权限-迭代");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
	
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			//on sale type
			productSaveModel.setOnSaleType(0);
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			//修改catalogstatus
			addProdReq.getProduct().setCatalogStatus(5);//5贝海保税区，4买手保税区
			addProdReq.getProduct().setBondedArea(2);
			//先删isDelete=true
			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), true);
			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), true);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回code");
			Logger.verifyEquals(true, ret.getString("Msg").contains("买手没有当前的物流方式发布权限"), "返回Msg");
			//后设置isDelete=false
			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), false);
			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), false);

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_024() throws Exception {
		Logger.start(true,"物流-修改product-买手没有当前国家的保税仓发布权限-贝海保税区-迭代");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
	
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			//on sale type
			productSaveModel.setOnSaleType(0);
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			//修改catalogstatus
			addProdReq.getProduct().setCatalogStatus(5);//5贝海保税区，4买手保税区
			addProdReq.getProduct().setBondedArea(2);
//			//先删isDelete=true
//			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), true);
//			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), true);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回code");
			Logger.verifyEquals(true, ret.getString("Msg").contains("买手没有当前的物流方式发布权限"), "返回Msg");
//			//后设置isDelete=false
//			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), false);
//			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), false);

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ModifySellerProduct_025() throws Exception {
		Logger.start(true,"物流-修改product-买手没有当前国家的保税仓发布权限-贝海保税区-迭代(物流接口经常出异常，此接口不稳定)");
		try{
			//AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			addProdReq.getProduct().setSellerCountryId(2);
			//20336378
			//不能上架 发布不上架商品
			//"可上架商品总数：0  已上架的商品数：0 剩余可上架商品数：0！\r\n请调整当前商品上架设置或调整已上架商品数量"
			ModifySellerProductRequest modifyBean = ModifyProductCallService.getModifySellerProductRequestFromAddProductBean(addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
	
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			//on sale type
			productSaveModel.setOnSaleType(0);
			//Tariff  Type
			productSaveModel.setTariffType(0);
			
			//修改catalogstatus
			addProdReq.getProduct().setCatalogStatus(4);//5贝海保税区，4买手保税区
			addProdReq.getProduct().setBondedArea(2);
//			//先删isDelete=true
//			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), true);
//			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), true);

			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(201, ret.getInt("Code"), "返回code");
		//	Logger.verifyEquals(true, ret.getString("Msg").contains("买手没有当前的保税仓发布权限"), "返回Msg");
//			//后设置isDelete=false
//			countryToModeWapper.updateBycountryAndStatus(0, addProdReq.getProduct().getCatalogStatus(), false);
//			sellerToMode.updateBySellerIdAndStatus(sellerId, addProdReq.getProduct().getCatalogStatus(), false);

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_026() throws Exception {
		Logger.start(true,"规格-修改product-规格，修改时增加规格属性-规格id不变");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			productSaveModel.setRemark("remark_mtest");
			
		    List<CatalogSaveModel> catalogList = modifyBean.getProduct().getCatalogList();
//			CatalogSaveModel catalogMode1 = catalogList.get(0);
//			CatalogSaveModel catalogMode2 = catalogList.get(1);
			
		    //增加规格属性
			AddSellerProductRequest addProdReq2 = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);

			CatalogSaveModel catalogMode2=addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode2.setPrice(32344.32);
			catalogMode2.setMarketPrice(40000);
			catalogMode2.getPropertyList().get(0).setPropertyValue("绿色");
			//catalogMode2.getPropertyList().get(1).setPropertyValue("L");
			catalogMode2.setOperateType(1);
			catalogList.add(catalogMode2);
			 
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
		//	ModifyProductCallService.checkAddProduct(modifyBean);
			//ModifyProductCallService.checkAddProduct(productSaveModel);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_027() throws Exception {
		Logger.start(true,"规格-修改product-规格，修改规格属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
		     //修改规格属性
			 List<CatalogPropertySaveModel> propertModel=productSaveModel.getCatalogList().get(0).getPropertyList();
			 
			 propertModel.get(0).setPropertyName("尺码分类");
			 propertModel.get(0).setPropertyValue("S");
			 productSaveModel.getCatalogList().get(0).setPropertyList(propertModel);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_028() throws Exception {
		Logger.start(true,"规格-修改product-规格，修改时删除规格属性-保证规格id不变");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
            //删除规格属性
			List<CatalogPropertySaveModel> propertModel=productSaveModel.getCatalogList().get(0).getPropertyList();
			propertModel.remove(0);
			productSaveModel.getCatalogList().get(0).setPropertyList(propertModel);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_029() throws Exception {
		Logger.start(true,"商品-修改product下属性-增加描述图片-附带查看app文描图保存场景不变");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<String> dPicList=productSaveModel.getDescModel().getDescPicList();
			dPicList.add("http://pic1.ymatou.com/G01//M00/3A/B5/rBBlD1n4FoqAEeSFAAdYEcXNxCc315.png");
			
		
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_030() throws Exception {
		Logger.start(true,"商品-修改product下属性-修改描述图片-附带查看app文描图保存场景不变");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<String> dPicList=productSaveModel.getDescModel().getDescPicList();
			dPicList.add("http://pic1.ymatou.com/G01//M00/3A/B5/rBBlD1n4FoqAEeSFAAdYEcXNxCc315.png");
			
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_031() throws Exception {
		Logger.start(true,"商品-修改product下属性-删除描述图片-附带查看app文描图保存场景不变");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
            //删除图片
			List<String> dPicList=productSaveModel.getDescModel().getDescPicList();
			dPicList.remove(1);
		
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_032() throws Exception {
		Logger.start(true,"规格-多规格变为单规格,添加时是多规格，修改时是单规格，返回多规格（多规格不能转化为单规格）");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			

			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			catalogList.remove(0);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
			
			
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_033() throws Exception {
		Logger.start(true,"规格-多规格变为单规格,添加时是单规格，修改时是变为多规格，返回单规格");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			productSaveModel.getCatalogList().get(0).setOperateType(2);
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			
			//新增规格2
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(12);
			catalogMode3.setVipPrice(10);
			catalogMode3.setNewPrice(9);
			catalogMode3.getPropertyList().get(0).setPropertyValue("蓝色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("M");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_037() throws Exception {
		Logger.start(true,"规格-多规格,一个规格增加一个删除，规格数据库存在，报文catalogId为空，返回删除");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			productSaveModel.getCatalogList().get(0).setCatalogId("");
			//productSaveModel.getCatalogList().get(0).setOperateType(2);
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			
			//新增规格2
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(12);
			catalogMode3.setVipPrice(10);
			catalogMode3.setNewPrice(9);
			catalogMode3.getPropertyList().get(0).setPropertyValue("紫色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("M");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_039() throws Exception {
		Logger.start(true,"规格-多规格,一个规格增加一个删除，规格数据库存在，报文catalogId不为空,OperateType=3，返回删除");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			productSaveModel.getCatalogList().get(0).setOperateType(3);
			//productSaveModel.getCatalogList().get(0).setOperateType(2);
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			
			//新增规格2
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(12);
			catalogMode3.setVipPrice(10);
			catalogMode3.setNewPrice(9);
			catalogMode3.getPropertyList().get(0).setPropertyValue("紫色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("M");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_038() throws Exception {
		Logger.start(true,"规格-单规格变多规格,修改的规格与原规格一样，返回单规格");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			//productSaveModel.getCatalogList().get(0).setOperateType(2);
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			
			//新增规格2
			AddSellerProductRequest addProdReq2 = AddProductCallService.getAddSellerProductRequestFromFile("多规格", 
					MapUtil.hashMap("sellerId",sellerId,"sellerName",sellerName));
			CatalogSaveModel catalogMode3 = addProdReq2.getProduct().getCatalogList().get(0);
			catalogMode3.setPrice(12);
			catalogMode3.setVipPrice(10);
			catalogMode3.setNewPrice(9);
			catalogMode3.getPropertyList().get(0).setPropertyValue("黄色");
			catalogMode3.getPropertyList().get(1).setPropertyValue("S");
			catalogMode3.setOperateType(1);
			catalogList.add(catalogMode3);
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_034() throws Exception {
		Logger.start(true,"规格-单规格修改属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			catalogList.get(0).setOperateType(2);
			catalogList.get(0).getPropertyList().get(0).setPropertyValue("蓝色");
			//catalogList.get(0).getPropertyList().get(1).setPropertyValue("M");
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_035() throws Exception {
		Logger.start(true,"规格-多规格修改属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			List<CatalogSaveModel> catalogList=productSaveModel.getCatalogList();	
			catalogList.get(0).getPropertyList().get(0).setPropertyValue("红色");
			//catalogList.get(0).getPropertyList().get(1).setPropertyValue("L");
			
			JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
			Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");

//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	@Ignore
	public void Tc_ModifySellerProduct_036() throws Exception {
		Logger.start(true,"商品-修改product下属性-处理图片是否重复");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			
			 ExecutorService fixedThreadPool = Executors.newFixedThreadPool(3); 
			 
			 for (int i = 0; i < 50; i++) {  
				  int j=i;
				   fixedThreadPool.execute(new Runnable() {  
				    public void run() {  
				     try {  
				    	    System.out.println(j);  
							ProductSaveModel productSaveModel = modifyBean.getProduct();
							productSaveModel.setRemark("remark_mtest");
						     //修改规格属性
							 List<CatalogPropertySaveModel> propertModel=productSaveModel.getCatalogList().get(0).getPropertyList();
							 propertModel.get(1).setPropertyName("尺码分类");
							 propertModel.get(1).setPropertyValue("S");
							 productSaveModel.getCatalogList().get(0).setPropertyList(propertModel);
//							if(j==1){
//						     	productSaveModel.setProductId("624b4735-dfd8-4012-8933-427f2d227027");
//							}
				       JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
				       Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
				       ModifyProductCallService.checkAddProduct(modifyBean);
				     } catch (Exception e) {  
				      e.printStackTrace();  
				     }  
				    }  
				   }); 
			 }
//
//			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
//			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			ModifyProductCallService.checkAddProduct(modifyBean);

		
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_040() throws Exception {
		Logger.start(true,"规格-修改已删除的catalog属性失败");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			ProductSaveModel productSaveModel = modifyBean.getProduct();
			productSaveModel.setRemark("remark_mtest");
			//品牌
			productSaveModel.setBrandId(10145);
			productSaveModel.setBrandName("");
			//商品名称
			productSaveModel.setProductName("修改测试001");
			//修改品类
			productSaveModel.setThirdCategoryId(1460);
			productSaveModel.setSecondCategoryId(1420);
			//修改图片信息
			String pic1 = "http:://pic1.ymatou.com/G01//M00/3A/B5/modify-Uj1GHqM097.png";
			String pic2 = "http:://pic1.ymatou.com/G01//M00/322/B5/modify-Uj1GHqM097.png";
			productSaveModel.setProductPicList(Arrays.asList(pic1,pic2));
			//noticeRisk
			productSaveModel.setNoticeRisk(true);
			//autorefresh
			productSaveModel.setAutoRefresh(true);
			//productcode
			productSaveModel.setProductCode("312312325y");
			//no reason return
			productSaveModel.setNoReasonReturn(true);
			
			//onSaleType 定期上架
			productSaveModel.setOnSaleType(1);
			productSaveModel.setValidStart(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getDate()));
			productSaveModel.setValidEnd(new SimpleDateFormat(YMTDateUtil.YMDHMS).format(YMTDateUtil.getBeforeOrNextDate(7)));
			//3是删除
			productSaveModel.getCatalogList().forEach(catalog->catalog.setOperateType(3));
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200",modifySellerProductCall.getString("Code"), "返回码校验");

			Logger.comment("第二次修改:修改");
			productSaveModel.getCatalogList().forEach(catalog->catalog.setOperateType(2));
			modifySellerProductCall.callService();
			Logger.verifyEquals("201",modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyEquals("请刷新后重新提交", modifySellerProductCall.getString("Msg"), "返回Msg");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_041() throws Exception {
		Logger.start(true,"修改，不填写保税仓，成功");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setBondedArea(0);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200",modifySellerProductCall.getString("Code"), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_042() throws Exception {
		Logger.start(true,"修改，澳新版拼邮溯源， 低于100元  拼邮国内发货---不可以");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(20323792);
			addProdReq.getProduct().setSecondCategoryId(1130);
			addProdReq.getProduct().setThirdCategoryId(1117);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setPackageDeliveryType(2);
			modifyBean.getProduct().setCatalogStatus(7);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("201",modifySellerProductCall.getString("Code"), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_043() throws Exception {
		Logger.start(true,"修改，澳新版拼邮溯源，低于100元---贝海保税  可以");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(20323792);
			addProdReq.getProduct().setSecondCategoryId(1130);
			addProdReq.getProduct().setThirdCategoryId(1117);
			String ProductId = ProductManagerCallServiceV3.AddSellerProduct(addProdReq);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setCatalogStatus(5); 
			
			modifySellerProductCall.setData(modifyBean);
			
			modifySellerProductCall.addHeader("mock", "mock-enable");
			modifySellerProductCall.addHeader("mockId-1", "GUID");
			modifySellerProductCall.addHeader("mockApi-1", "orderdelivery-GetAvailableDeliveryMethod-Normal");
			
			modifySellerProductCall.addHeader("mockId-2", TestDataManager.getRandomUUID().toString());
			modifySellerProductCall.addHeader("mockApi-2", "orderdelivery-GetAvailableDeliveryMethodV2-Normal");
			
			modifySellerProductCall.callService();
			Logger.verifyEquals("200",modifySellerProductCall.getString("Code"), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0044() throws Exception {
		Logger.start(true,"商品-修改推荐理由属性");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			addProdReq.getProduct().setSourceType("APP");
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setRecomReason("测试推荐理由属性");
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			ModifyProductCallService.checkAddProduct(modifyBean);
			Thread.sleep(5000);
			String RecomReason=getRecomReason(ProductId);
			Logger.verifyEquals(modifyBean.getProduct().getRecomReason(), RecomReason, "验证RecomReason");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0044_2() throws Exception {
		Logger.start(true,"商品-修改推荐理由属性-PC也支持");
		try{
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			addProdReq.getProduct().setSourceType("PC");
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setRecomReason("测试推荐理由属性");
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			ModifyProductCallService.checkAddProduct(modifyBean);
			Thread.sleep(5000);
			String RecomReason=getRecomReason(ProductId);
			Logger.verifyEquals(modifyBean.getProduct().getRecomReason(), RecomReason, "验证RecomReason");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0045() throws Exception {
		Logger.start(true,"有推荐语，然后不编辑推荐语的时候，推荐语不要清空");
		try{
			
			AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			addProdReq.getProduct().setRecomReason("推1荐推荐");
			addProdReq.setProductSite("1");
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(10000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setRecomReason("111333");
			modifyBean.setProductSite("1");
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0046() throws Exception {
		Logger.start(true,"编辑关联商品库的商品时，品牌不能修改。");
		try{
			
			//AddSellerProductRequest addProdReq = ProductManagerCallServiceV2.initAddSellerProductRequest(sellerId);
			//String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			
		    AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerSpuProduct(3383);
		//	String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			String ProductId = ProductManagerCallServiceV3.AddSellerProduct(addProdReq);;
			//Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setSpuProductId(null);
			modifyBean.getProduct().setSpuId(0);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0047() throws Exception {
		Logger.start(true,"编辑关联商品库的商品时，类目 不能修改。");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerSpuProduct(288484);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setSecondCategoryId(1099);
			modifyBean.getProduct().setThirdCategoryId(1099);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("201", modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyIsContains("商品品类和品牌需与标准商品库保持一致不能修改", modifySellerProductCall.getString("Msg"), "返回码校验");
			modifyBean.getProduct().setSecondCategoryId(1087);
			modifyBean.getProduct().setThirdCategoryId(1096);
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0048() throws Exception {
		Logger.start(true,"编辑关联商品库的商品时，商品属性 不能修改。");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerSpuProduct(288484);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			List<ProductPropertySaveModel> propertyList = modifyBean.getProduct().getPropertyList();
			modifyBean.getProduct().setPropertyList(null);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			
			Logger.verifyEquals("201", modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyIsContains("品属性需与标准商品保持一致不能修改", modifySellerProductCall.getString("Msg"), "返回码校验");
			modifyBean.getProduct().setPropertyList(propertyList);
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0049() throws Exception {
		Logger.start(true,"编辑商品时，高危类目，提示需要审核");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setSecondCategoryId(1804);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyIsContains("需要平台审核", modifySellerProductCall.getJsonObject().getAsJsonObject("Data").get("Message").getAsString(), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0050() throws Exception {
		Logger.start(true,"编辑商品时,有敏感词，禁止修改");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setProductName("测试山沟" + YMTDateUtil.getDate().getTime()+"手枪");
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("201", modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyIsContains("包含敏感词", modifySellerProductCall.getString("Msg"), "返回码校验");
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0051() throws Exception {
		Logger.start(true,"编辑商品时,增加价格，成为奢侈品，参加奢品护航");
		try{
			/*
			 * select * from   luxury_rule_scope where brand_id='10187';
			   select * from luxury_rule  where luxury_scope_id=303;
			   select * from luxury_rule_valid_date   where luxury_rule_id=304;
			 */
			
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
//			//addProdReq.getProduct();
			String ProductId = ProductManagerCallServiceV3.AddSellerProduct(addProdReq);
		//	String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			//String ProductId="p5311257";
		//	Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().getCatalogList().get(0).setPrice(10000);
			modifyBean.getProduct().getCatalogList().get(0).setNewPrice(10000);
			modifyBean.getProduct().getCatalogList().get(0).setVipPrice(10000);
			modifyBean.getProduct().getCatalogList().get(0).setMarketPrice(18000);
			
			this.modifyAndCheck(modifyBean);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			
			ProductManagerCallServiceV2.EqualsIsLuxury(ProductId, true);
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0052() throws Exception {
		Logger.start(true,"编辑奢品护航的商品时,修改品牌，会降为普通商品");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			addProdReq.getProduct().getCatalogList().get(0).setPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setNewPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setVipPrice(10000);
			addProdReq.getProduct().getCatalogList().get(0).setMarketPrice(18000);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setBrandId(10188);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			
			ProductManagerCallServiceV2.EqualsIsLuxury(ProductId, false);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0053() throws Exception {
		Logger.start(true,"编辑商品，修改物流时效");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setDeliveryCompanyType(1);
			modifyBean.getProduct().setDeliveryAging(5);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			Thread.sleep(3000);
			YmtProductsI ymtProductsI = new YmtProductsIWapper().selectProductByProductId(ProductId).get(0);
			Logger.verifyEquals(1, ymtProductsI.getDeliveryCompanyType(), "验证物流方式");
			Logger.verifyEquals(5, ymtProductsI.getDeliveryAging(), "验证物流时效");
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0054() throws Exception {
		Logger.start(true,"newDeliveryAppRelease 为true时，允许发布新物流商品");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			addProdReq.getProduct().setCatalogStatus(4);
			addProdReq.getProduct().setDeliveryCompanyType(1);
			addProdReq.getProduct().setDeliveryAging(5);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setCatalogStatus(10);
			modifyBean.getProduct().setDeliveryCompanyType(1);
			modifyBean.getProduct().setDeliveryAging(5);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService(); 
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			Thread.sleep(3000);
			YmtProductsI ymtProductsI = new YmtProductsIWapper().selectProductByProductId(ProductId).get(0);
			Logger.verifyEquals(10,ymtProductsI.getiCatalogStatus(), "验证物流方式");			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0055() throws Exception {
		Logger.start(true,"newDeliveryAppRelease 为true时，不允许发布编辑老物流商品");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerGlobalPspProductRequest(3383);
			addProdReq.getProduct().setCatalogStatus(10);
			addProdReq.getProduct().setDeliveryCompanyType(1);
			addProdReq.getProduct().setDeliveryAging(5);
			
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setCatalogStatus(3);
			modifyBean.getProduct().setDeliveryCompanyType(1);
			modifyBean.getProduct().setDeliveryAging(5);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("200", modifySellerProductCall.getString("Code"), "返回码校验");
			Thread.sleep(3000);
			YmtProductsI ymtProductsI = new YmtProductsIWapper().selectProductByProductId(ProductId).get(0);
			Logger.verifyEquals(10,ymtProductsI.getiCatalogStatus(), "验证物流方式");
			
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_ModifySellerProduct_0056() throws Exception {
		Logger.start(true,"编辑商品可以解除挂库或重新关联");
		try{
			AddSellerProductRequest addProdReq =ProductManagerCallServiceV2.initAddSellerSpuProduct(288484);
			String ProductId = ProductManagerCallServiceV2.addNewProduct(addProdReq).get("Data").getAsJsonObject().get("ProductId").getAsString();
			Thread.sleep(3000);
			ModifySellerProductRequest modifyBean = ProductManagerCallServiceV2.getModifySellerProductRequestFromAddProductBean(ProductId,addProdReq);
			modifyBean.getProduct().setBrandId(13541);
			modifySellerProductCall.setData(modifyBean);
			modifySellerProductCall.callService();
			Logger.verifyEquals("201", modifySellerProductCall.getString("Code"), "返回码校验");
			Logger.verifyIsContains("商品品类和品牌需与标准商品库保持一致不能修改", modifySellerProductCall.getString("Msg"), "返回码校验");
			modifyBean.getProduct().setBrandId(13540);
			ModifyProductCallService.checkAddProduct(modifyBean);
		}catch(Exception e){
			Logger.fail(e);
		}
	}
	
	
	
	
	public static void modifyAndCheck(ModifySellerProductRequest modifyBean) throws Exception{
		JSONObject ret = modifySellerProductCall.callAndGetReturnData(modifyBean);
		Logger.verifyEquals(200, ret.getInt("Code"), "返回码校验");
		ModifyProductCallService.checkAddProduct(modifyBean);
	}
	public static String getRecomReason(String productId) throws ClientProtocolException, IOException {
		GetProductListByProductIdListBean GetProductListByProductIdListBean=new com.ymatou.iapi.productquery.parameter.GetProductListByProductIdListBean();
		GetProductListByProductIdListCall  getProductListByProductIdListCall=new GetProductListByProductIdListCall();
		List<String> prodList = Arrays.asList(productId);
		GetProductListByProductIdListBean.setNextActivityExpire(1);
		GetProductListByProductIdListBean.setProductIdList(prodList);
		getProductListByProductIdListCall.setData(GetProductListByProductIdListBean);
		getProductListByProductIdListCall.callService();
		JsonObject Product = getProductListByProductIdListCall.getJsonObject().get("Data").getAsJsonObject()
				.getAsJsonArray("ProductList").get(0).getAsJsonObject();
		return Product.get("RecomReason").getAsString();
	}
}
